package cool.tenyears.core.enums;

/**
 * @author LiChuan
 * @date 2021/6/17 19:28
 * public static final int CODE_SUCCESS = 200;			// 成功状态码
 * 	public static final int CODE_ERROR = 500;			// 错误状态码
 * 	public static final int CODE_WARNING = 501;			// 警告状态码
 * 	public static final int CODE_NOT_JUR = 403;			// 无权限状态码
 * 	public static final int CODE_NOT_LOGIN = 401;		// 未登录状态码
 * 	public static final int CODE_INVALID_REQUEST = 400;	// 无效请求状态码
 */
public enum RepCodeEnum {
    SUCCESS(200, "操作成功"),
    ERROR(500, "操作失败"),
    WARNING(501, "操作警告"),
    UNAUTH(403, "没有操作权限"),
    NOT_LOGIN(402, "用户未登录"),
    INVALID_REQUEST(400, "无效请求");

    private Integer code;
    private String msg;

    RepCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
